package {
	import business.StockQuoteManager;
	import routes.Routes;
	
	// Initialize the Routes event bus for the application
	// Should be called early during application initialization
	public function setupRoutes():void {
		// create the routes instance, and make it available globally
		g.routes = new Routes();
		g.routes.addRoutes(routeMap);
		// create/register singleton instances for non-UI business objects
		g.routes.register("stockQuoteManager", new StockQuoteManager());
	}
}

// Application route map -- each route is defined as:
//  ["eventType", "registeredInstanceName", "methodName"]
var routeMap:Array = [
	["getStockQuote", "stockQuoteManager", "getQuoteForSymbol"],
	["gotStockQuote", "stockQuoteView", "updateQuoteForSymbol"],
];
